package personal.persistance.model;

import personal.persistance.AbstractJdbcModel;
import personal.persistance.mapper.MapperConstant;

/**
 *
 * @author LocNguyen
 */
public class AlbumDetail extends AbstractJdbcModel<Integer> {
    
    private int albumId;
    private int imageId;

    public AlbumDetail() {
    }

    public AlbumDetail(int albumId, int imageId) {
        this.albumId = albumId;
        this.imageId = imageId;
    }

    public int getAlbumId() {
        return albumId;
    }

    public void setAlbumId(int albumId) {
        this.albumId = albumId;
    }

    public int getImageId() {
        return imageId;
    }

    public void setImageId(int imageId) {
        this.imageId = imageId;
    }

    @Override
    public String getTableName() {
        return MapperConstant.DB_NAME
            + ".album_detail";
    }
    
    @Override
    public String[] getColumnNames() {
        return new String[] {
            "AlbumId",
            "ImageId"
        };
    }

    @Override
    public Object[] getColumnValues() {
        return new Object[] {
            albumId, imageId
        };
    }

    @Override
    public void setColumnValues(Object[] values) {
        albumId = Integer.parseInt(values[0].toString());
        imageId = Integer.parseInt(values[1].toString());
    }

    @Override
    public boolean isIdAutoIncrement() {
        return true;
    }
    
}
